3.10.88 \(\int x^m (2-a x)^n (2+a x)^n \, dx\) [988]

Optimal. Leaf size=42 \[ \frac {4^n x^{1+m} \, _2F_1\left (\frac {1+m}{2},-n;\frac {3+m}{2};\frac {a^2 x^2}{4}\right )}{1+m} \]

[Out]

4^n*x^(1+m)*hypergeom([-n, 1/2+1/2*m],[3/2+1/2*m],1/4*a^2*x^2)/(1+m)

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 42, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.105, Rules used = {126, 371} \begin {gather*} \frac {4^n x^{m+1} \, _2F_1\left (\frac {m+1}{2},-n;\frac {m+3}{2};\frac {a^2 x^2}{4}\right )}{m+1} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[x^m*(2 - a*x)^n*(2 + a*x)^n,x]

[Out]

(4^n*x^(1 + m)*Hypergeometric2F1[(1 + m)/2, -n, (3 + m)/2, (a^2*x^2)/4])/(1 + m)

Rule 126

Int[((f_.)*(x_))^(p_.)*((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[(a*c + b*d*x^2)
^m*(f*x)^p, x] /; FreeQ[{a, b, c, d, f, m, n, p}, x] && EqQ[b*c + a*d, 0] && EqQ[n, m] && GtQ[a, 0] && GtQ[c,
0]

Rule 371

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[a^p*((c*x)^(m + 1)/(c*(m + 1)))*Hyperg
eometric2F1[-p, (m + 1)/n, (m + 1)/n + 1, (-b)*(x^n/a)], x] /; FreeQ[{a, b, c, m, n, p}, x] &&  !IGtQ[p, 0] &&
 (ILtQ[p, 0] || GtQ[a, 0])

Rubi steps

\begin {align*} \int x^m (2-a x)^n (2+a x)^n \, dx &=\int x^m \left (4-a^2 x^2\right )^n \, dx\\ &=\frac {4^n x^{1+m} \, _2F_1\left (\frac {1+m}{2},-n;\frac {3+m}{2};\frac {a^2 x^2}{4}\right )}{1+m}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.06, size = 44, normalized size = 1.05 \begin {gather*} \frac {4^n x^{1+m} \, _2F_1\left (\frac {1+m}{2},-n;1+\frac {1+m}{2};\frac {a^2 x^2}{4}\right )}{1+m} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[x^m*(2 - a*x)^n*(2 + a*x)^n,x]

[Out]

(4^n*x^(1 + m)*Hypergeometric2F1[(1 + m)/2, -n, 1 + (1 + m)/2, (a^2*x^2)/4])/(1 + m)

________________________________________________________________________________________

Maple [F]
time = 0.03, size = 0, normalized size = 0.00 \[\int x^{m} \left (-a x +2\right )^{n} \left (a x +2\right )^{n}\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^m*(-a*x+2)^n*(a*x+2)^n,x)

[Out]

int(x^m*(-a*x+2)^n*(a*x+2)^n,x)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^m*(-a*x+2)^n*(a*x+2)^n,x, algorithm="maxima")

[Out]

integrate((a*x + 2)^n*(-a*x + 2)^n*x^m, x)

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^m*(-a*x+2)^n*(a*x+2)^n,x, algorithm="fricas")

[Out]

integral((a*x + 2)^n*(-a*x + 2)^n*x^m, x)

________________________________________________________________________________________

Sympy [C] Result contains complex when optimal does not.
time = 19.62, size = 221, normalized size = 5.26 \begin {gather*} \frac {2^{m} 2^{2 n} a^{- m} {G_{6, 6}^{5, 3}\left (\begin {matrix} - \frac {m}{2} - \frac {n}{2}, - \frac {m}{2} - \frac {n}{2} + \frac {1}{2}, 1 & \frac {1}{2} - \frac {m}{2}, - \frac {m}{2} - n, - \frac {m}{2} - n + \frac {1}{2} \\- \frac {m}{2} - n - \frac {1}{2}, - \frac {m}{2} - n, - \frac {m}{2} - \frac {n}{2}, - \frac {m}{2} - n + \frac {1}{2}, - \frac {m}{2} - \frac {n}{2} + \frac {1}{2} & 0 \end {matrix} \middle | {\frac {4 e^{- 2 i \pi }}{a^{2} x^{2}}} \right )} e^{- i \pi m} e^{- i \pi n}}{2 \pi a \Gamma \left (- n\right )} - \frac {2^{m} 2^{2 n} a^{- m} {G_{6, 6}^{2, 6}\left (\begin {matrix} - \frac {m}{2} - \frac {1}{2}, - \frac {m}{2}, \frac {1}{2} - \frac {m}{2}, - \frac {m}{2} - \frac {n}{2} - \frac {1}{2}, - \frac {m}{2} - \frac {n}{2}, 1 & \\- \frac {m}{2} - \frac {n}{2} - \frac {1}{2}, - \frac {m}{2} - \frac {n}{2} & - \frac {m}{2} - \frac {1}{2}, - \frac {m}{2}, - \frac {m}{2} - n - \frac {1}{2}, 0 \end {matrix} \middle | {\frac {4}{a^{2} x^{2}}} \right )}}{2 \pi a \Gamma \left (- n\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**m*(-a*x+2)**n*(a*x+2)**n,x)

[Out]

2**m*2**(2*n)*meijerg(((-m/2 - n/2, -m/2 - n/2 + 1/2, 1), (1/2 - m/2, -m/2 - n, -m/2 - n + 1/2)), ((-m/2 - n -
 1/2, -m/2 - n, -m/2 - n/2, -m/2 - n + 1/2, -m/2 - n/2 + 1/2), (0,)), 4*exp_polar(-2*I*pi)/(a**2*x**2))*exp(-I
*pi*m)*exp(-I*pi*n)/(2*pi*a*a**m*gamma(-n)) - 2**m*2**(2*n)*meijerg(((-m/2 - 1/2, -m/2, 1/2 - m/2, -m/2 - n/2
- 1/2, -m/2 - n/2, 1), ()), ((-m/2 - n/2 - 1/2, -m/2 - n/2), (-m/2 - 1/2, -m/2, -m/2 - n - 1/2, 0)), 4/(a**2*x
**2))/(2*pi*a*a**m*gamma(-n))

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^m*(-a*x+2)^n*(a*x+2)^n,x, algorithm="giac")

[Out]

integrate((a*x + 2)^n*(-a*x + 2)^n*x^m, x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \int x^m\,{\left (2-a\,x\right )}^n\,{\left (a\,x+2\right )}^n \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^m*(2 - a*x)^n*(a*x + 2)^n,x)

[Out]

int(x^m*(2 - a*x)^n*(a*x + 2)^n, x)

________________________________________________________________________________________